-- GENERATED SPELL FOR [Artruis the Heartless] --


function spell0_28659(pUnit, Event) --@Bindings of Submission,n/a--
pUnit:FullCastSpellOnTarget(52185,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28659', 578, 1)
end

function spell1_28659(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_28659', 8342, 1)
end

function spell2_28659(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(15530,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28659', 7000, 1)
end

function spell3_28659(pUnit, Event) --@Ice Lance,n/a--
pUnit:FullCastSpellOnTarget(54261,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28659', 647, 1)
end

function spell4_28659(pUnit, Event) --@Icy Veins,Self--
pUnit:FullCastSpellOnTarget(54792,pUnit)
pUnit:RegisterEvent('Sorts_28659', 20317, 1)
end

function Sorts_28659(pUnit, Event)
local choix_sorts_28659 = math.random(0, 4)
if choix_sorts_28659 == 0 then
pUnit:RegisterEvent('spell0_28659', 1, 1)
end
if choix_sorts_28659 == 1 then
pUnit:RegisterEvent('spell1_28659', 1, 1)
end
if choix_sorts_28659 == 2 then
pUnit:RegisterEvent('spell2_28659', 1, 1)
end
if choix_sorts_28659 == 3 then
pUnit:RegisterEvent('spell3_28659', 1, 1)
end
if choix_sorts_28659 == 4 then
pUnit:RegisterEvent('spell4_28659', 1, 1)
end
end

function mob28659_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28659', math.random(1500, 3000), 1)
end

function mob28659_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28659_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28659_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28659, 1, 'mob28659_Action')
RegisterUnitEvent(28659, 2, 'mob28659_Leave')
RegisterUnitEvent(28659, 3, 'mob28659_Kill')
RegisterUnitEvent(28659, 4, 'mob28659_Die')
